package com.niiwoo.civet.trade.service.local.invest;

import java.util.Date;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.niiwoo.civet.trade.dao.entity.CreditorSaleDetail;
import com.niiwoo.civet.trade.dao.entity.ProjectInvestorPlan;
import com.niiwoo.civet.trade.dao.mapper.CreditorSaleDetailMapperExt;
import com.niiwoo.civet.trade.dao.mapper.ProjectInvestorPlanMapperExt;
import com.niiwoo.civet.trade.dto.invest.DayAllProjectInvestorPlanDTO;
import com.niiwoo.civet.trade.dto.invest.InvestPlanStatDTO;

@Service
public class InvestCalendarLocalService {
	@Autowired
    private ProjectInvestorPlanMapperExt projectInvestorPlanMapperExt;
	
	@Autowired
	private CreditorSaleDetailMapperExt creditorSaleDetailMapperExt;
	
	public List<DayAllProjectInvestorPlanDTO> getDayAllProjectInvestorPlans(String userId, Date beginDate, Date endDate) {
		return projectInvestorPlanMapperExt.getDayAllProjectInvestorPlans(userId, beginDate, endDate);
	}

	public List<DayAllProjectInvestorPlanDTO> getUnreceivedProjectInvestorPlans(String userId, Date beginDate, Date endDate) {
		return projectInvestorPlanMapperExt.getUnreceivedProjectInvestorPlans(userId, beginDate, endDate);
	}

	public List<InvestPlanStatDTO> findMonthEveryDayUnReceiveInvestPlans(String userId, Date beginDate, Date endDate) {
		return projectInvestorPlanMapperExt.findMonthEveryDayUnReceiveInvestPlans(userId, beginDate, endDate);
	}
	
	public List<InvestPlanStatDTO> findMonthEveryDayReceivedInvestPlans(String userId, Date beginDate, Date endDate) {
		return projectInvestorPlanMapperExt.findMonthEveryDayReceivedInvestPlans(userId, beginDate, endDate);
	}
	
	public List<InvestPlanStatDTO> findYearEveryMonthUnReceiveInvestPlans(String userId, Date beginDate, Date endDate) {
		return projectInvestorPlanMapperExt.findYearEveryMonthUnReceiveInvestPlans(userId, beginDate, endDate);
	}
	
	public List<InvestPlanStatDTO> findYearEveryMonthReceivedInvestPlans(String userId, Date beginDate, Date endDate) {
		return projectInvestorPlanMapperExt.findYearEveryMonthReceivedInvestPlans(userId, beginDate, endDate);
	}
	
	public List<CreditorSaleDetail> findUserUnderwayCreditorSaleDetail(String userId, Date beginDate, Date endDate) {
		return creditorSaleDetailMapperExt.findUserUnderwayCreditorSaleDetail(userId, beginDate, endDate);
	}

	public List<ProjectInvestorPlan> findAllPrizePlans(String userId, Date beginDate, Date endDate) {
		return projectInvestorPlanMapperExt.findAllPrizePlans(userId, beginDate, endDate);
	}
}
